package com.spring.scope;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class App {
	
	public static void main(String[] args) {
		
		ApplicationContext context = new ClassPathXmlApplicationContext("Scope-Module.xml");
		
		CustomerService custA =(CustomerService) context.getBean("customerService"); 
		
		custA.setMessage("Message by cutsA");
		System.out.println("Message : "+custA.getMessage());
		System.out.println(custA);
		
		
		CustomerService custB = (CustomerService)context.getBean("customerService");
		custB.setMessage("Message by cutsB");
		System.out.println("Message : "+custB.getMessage());
		System.out.println(custB);

		
		
	}

}
